//
//  RNOLInvestCalendarHeader.m
//  RongNiuOnline
//
//  Created by apple on 2018/5/4.
//  Copyright © 2018年 rongniu. All rights reserved.
//

#import "RNOLInvestCalendarHeader.h"

@interface RNOLInvestCalendarHeader()

@property (weak, nonatomic) IBOutlet UIButton *rightButton;


@end


@implementation RNOLInvestCalendarHeader

- (void)awakeFromNib{
    [super awakeFromNib];
    self.dateLabel.userInteractionEnabled = YES;
    @weakify(self);
    [self.dateLabel addTapActionWithBlock:^(UIGestureRecognizer *gestureRecoginzer) {
       @strongify(self);
        !self.selectDateBlock? : self.selectDateBlock();
    }];
    self.rightButton.imageView.transform = CGAffineTransformMakeRotation(M_PI);
}


- (IBAction)lastMonthAction:(UIButton *)sender {
    !self.lastMonthBlock? : self.lastMonthBlock();
}

- (IBAction)nextMonthAction:(UIButton *)sender {
    !self.nextMonthBlock? : self.nextMonthBlock();
}


@end
